
import withdrawalApplicationBox from '../../views/mall/withdrawalApplicationBox'
let extension = {
  components: {//动态扩充组件或组件路径
    //表单header、content、footer对应位置扩充的组件
    gridHeader: '',//{ template: "<div>扩展组xx件</div>" },
    gridBody: '',
    gridFooter: withdrawalApplicationBox,
    //弹出框(修改、编辑、查看)header、content、footer对应位置扩充的组件
    modelHeader: '',
    modelBody: '',
    modelFooter: ''
  },
  buttons: { view: [], box: [], detail: [] },//扩展的按钮
  methods: {//事件扩展
    onInit () {
      this.columns.push(
        {
          field: '',
          title: '操作',
          type: 'int',
          fixed: 'right',
          width: 100,
          align: 'left',
          render: (h, { row, c, index }) => {
            return [
              h('el-button', {
                props: {
                  type: 'text', size: 'mini',
                },
                on: {
                  click: () => {
                    this.$refs.gridFooter.open(row.id);
                  },
                }
              }, '申请明细'),
            ]
          }
        }
      )
    },
    rowClick ({ row, column, event }) {
      //查询界面table点击行选中当前行
      this.$refs.table.$refs.table.toggleRowSelection(row);
      return true;
    },
  }
};
export default extension;
